package com.siao.example.common.ui
{
	import com.siao.display.LayoutElement;
	import com.siao.errors.SingletonError;
	
	/**
	 * 程序图层
	 * @author SiaoLeon
	 */
	public class Layer
	{
		// -------------------------------------------------------------------------------------------------------- 静态常量
		
		// -------------------------------------------------------------------------------------------------------- 静态变量
		
		private static var _instance:Layer;
		
		/**
		 * 获取单例对象
		 */
		public static function get instance():Layer
		{
			if (_instance == null)
			{
				_instance = new Layer();
			}
			return _instance;
		}
		
		// -------------------------------------------------------------------------------------------------------- 静态方法
		
		// -------------------------------------------------------------------------------------------------------- 静态函数
		
		// -------------------------------------------------------------------------------------------------------- 属性
		
		/**
		 * 背景图层
		 */
		public var background:LayoutElement = new LayoutElement();
		
		/**
		 * 内容图层
		 */
		public var content:LayoutElement = new LayoutElement();
		
		/**
		 * 前景图层
		 */
		public var foreground:LayoutElement = new LayoutElement();
		
		/**
		 * 弹窗图层
		 */
		public var popup:LayoutElement = new LayoutElement();
		
		/**
		 * 对话框图层
		 */
		public var dialog:LayoutElement = new LayoutElement();
		
		/**
		 * 提示图层
		 */
		public var tooltip:LayoutElement = new LayoutElement();
		
		// -------------------------------------------------------------------------------------------------------- 变量
		
		// -------------------------------------------------------------------------------------------------------- 构造
		
		/**
		 * 构造函数，单例模式
		 */
		public function Layer()
		{
			if (_instance != null)
			{
				throw new SingletonError(this);
			}
			_instance = this;
		}
	
		// -------------------------------------------------------------------------------------------------------- 方法
	
		// -------------------------------------------------------------------------------------------------------- 函数
	
	}
}
